﻿using System.ComponentModel;
using Kent.Boogaart.HelperTrinity.Extensions;

namespace Kent.Boogaart.Truss.Specifications.Support.Entities
{
	public abstract class EntityBase : INotifyPropertyChanged
	{
		public event PropertyChangedEventHandler PropertyChanged;

		protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
		{
			PropertyChanged.Raise(this, e);
		}

		protected void OnPropertyChanged(string propertyName)
		{
			OnPropertyChanged(new PropertyChangedEventArgs(propertyName));
		}
	}
}